package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HospitalSubscribeProjectMapper;
import com.ruoyi.system.domain.HospitalSubscribeProject;
import com.ruoyi.system.service.IHospitalSubscribeProjectService;

/**
 * 体检检查项目Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-26
 */
@Service
public class HospitalSubscribeProjectServiceImpl implements IHospitalSubscribeProjectService 
{
    @Autowired
    private HospitalSubscribeProjectMapper hospitalSubscribeProjectMapper;

    /**
     * 查询体检检查项目
     * 
     * @param id 体检检查项目主键
     * @return 体检检查项目
     */
    @Override
    public HospitalSubscribeProject selectHospitalSubscribeProjectById(Long id)
    {
        return hospitalSubscribeProjectMapper.selectHospitalSubscribeProjectById(id);
    }

    /**
     * 查询体检检查项目列表
     * 
     * @param hospitalSubscribeProject 体检检查项目
     * @return 体检检查项目
     */
    @Override
    public List<HospitalSubscribeProject> selectHospitalSubscribeProjectList(HospitalSubscribeProject hospitalSubscribeProject)
    {
        return hospitalSubscribeProjectMapper.selectHospitalSubscribeProjectList(hospitalSubscribeProject);
    }

    /**
     * 新增体检检查项目
     * 
     * @param hospitalSubscribeProject 体检检查项目
     * @return 结果
     */
    @Override
    public int insertHospitalSubscribeProject(HospitalSubscribeProject hospitalSubscribeProject)
    {
        hospitalSubscribeProject.setCreateTime(DateUtils.getNowDate());
        return hospitalSubscribeProjectMapper.insertHospitalSubscribeProject(hospitalSubscribeProject);
    }

    /**
     * 修改体检检查项目
     * 
     * @param hospitalSubscribeProject 体检检查项目
     * @return 结果
     */
    @Override
    public int updateHospitalSubscribeProject(HospitalSubscribeProject hospitalSubscribeProject)
    {
        hospitalSubscribeProject.setUpdateTime(DateUtils.getNowDate());
        return hospitalSubscribeProjectMapper.updateHospitalSubscribeProject(hospitalSubscribeProject);
    }

    /**
     * 批量删除体检检查项目
     * 
     * @param ids 需要删除的体检检查项目主键
     * @return 结果
     */
    @Override
    public int deleteHospitalSubscribeProjectByIds(Long[] ids)
    {
        return hospitalSubscribeProjectMapper.deleteHospitalSubscribeProjectByIds(ids);
    }

    /**
     * 删除体检检查项目信息
     * 
     * @param id 体检检查项目主键
     * @return 结果
     */
    @Override
    public int deleteHospitalSubscribeProjectById(Long id)
    {
        return hospitalSubscribeProjectMapper.deleteHospitalSubscribeProjectById(id);
    }

    @Override
    public List<HospitalSubscribeProject> getHospitalSubscribeProjectByIds(List<String> ids) {
        return hospitalSubscribeProjectMapper.getHospitalSubscribeProjectByIds(ids);
    }
}
